package com.chase.chasecat.utils;

import com.chase.chasecat.entity.UserEntity;

public class UserUtil {
    private static ThreadLocal<UserEntity> threadLocal = ThreadLocal.withInitial(null);

    private UserUtil() {
    }

    public static void setUser(UserEntity user) {
        threadLocal.set(user);
    }

    public static UserEntity getCurrentUser() {
        return threadLocal.get();
    }
}
